%Computes the Newey-West t-statistics corrected for L lags regressing on a constant. 

function b=t_nw_const(Y,L)

X=[ones(length(Y),1)];
[beta, R2, R2adj, X2_NW, X2_HH, X2_R, ...
        std_NW, std_HH, std_R, t_NW, t_HH, t_R] = ...
        olshac(Y,X,L,2);
    b=t_NW;
end